package com.yiyuan.app.entity.enums;

/**
 * @Author: zhangxilin
 * @Date: 2025/3/17
 */
public enum RankSearchTypeEnum {
    DAILY("daily", "日榜"),
    WEEK("week", "周榜"),
    PRE_DAILY("pre_daily", "上周榜"),

    ;

    private String code;

    private String description;

    public static RankSearchTypeEnum getByCode(String code){
        for (RankSearchTypeEnum enums : RankSearchTypeEnum.values()){
            if (enums.getCode().equals(code)){
                return enums;
            }
        }
        return  null;
    }

    RankSearchTypeEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
